package com.earthchen.decoder;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToMessageDecoder;

import java.util.List;

/**
 * @author: EarthChen
 * @date: 2018/05/02
 */
public class StringToIntegerDecoder extends MessageToMessageDecoder<String> {


    @Override
    protected void decode(ChannelHandlerContext channelHandlerContext, String s, List<Object> list) throws Exception {
        list.add(Integer.parseInt(s));
    }
}
